﻿using CommandProcessor.Command;
using Core.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommandProcessor.Dispatcher
{
    public interface ICommandBus
    {
        //Dung thuc thi cau lenh
        ICommandResult Submit<TCommand>(TCommand command) where TCommand : ICommand;
        ICommandResult SubmitRange<TCommand>(IEnumerable<TCommand> commands) where TCommand : ICommand;
        ICommandResult DeleteRange<TCommand>(IEnumerable<TCommand> commands) where TCommand : ICommand;
        //Dung cho bat loi
        IEnumerable<ValidationResult> Validate<TCommand>(TCommand command) where TCommand : ICommand;
        IEnumerable<ValidationResult> ValidateRange<TCommand>(IEnumerable<TCommand> commands) where TCommand : ICommand;
    }
}
